//
//  UISwitch+AWTheme.m
//  changeShin
//
//  Created by Alan Wang on 2019/3/26.
//  Copyright © 2019 Alan Wang. All rights reserved.
//

#import "UISwitch+AWTheme.h"
#import "NSObject+AWTheme.h"

@implementation UISwitch (AWTheme)
-(void)AWTheme_OnTintColorForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        UIColor * color = [[AWThemeManager shareInstance] colorForKey:key];
        if(color){
            self.onTintColor = color;
        }
    } forKey:@"onTintColor"];
}
-(void)AWTheme_ThumbTintColorForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        UIColor * color = [[AWThemeManager shareInstance] colorForKey:key];
        if(color){
            self.thumbTintColor = color;
        }
    } forKey:@"thumbTintColor"];
}
@end
